// 该文件专门用于创建整个应用的路由器

import VueRouter  from "vue-router";
//  创建并暴露一个路由器
export default new VueRouter({
    routes: [
        {
            path: '/about',
            component: () => import('../pages/About.vue'),
        },
        {
            path: '/home',
            component: ()=> import('../pages/Home.vue'),
            children: [
                {
                    path: 'news',
                    component: () => import('../pages/News.vue'),
                },
                {
                    path: 'msg',
                    component: () => import('../pages/Message.vue'),
                    children: [
                        {
                            path: "detail",
                            component: () => import('../pages/Detail.vue'),
                        }
                    ]
                }
            ]
        },
    ]
})